<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
        <html>
            <head>
                <title>XTREAM LOGGING</title>
                <style>

                  .table-main { border-style: none; font-family:Verdana }
                  .table-header { font-weight: bold; color: #FFFFFF; border-right: 2.25pt solid #FFFFFF; font-family:Verdana; font-size:10pt;
                  border-top: 2.25pt solid #FFFFFF; background-color:#000000 }
                  .table-row { font-weight: normal; color: #000000; border-right: 2.25pt solid #FFFFFF;
                  border-top: 2.25pt solid #FFFFFF; background-color: #E1E6EC; font-family:Verdana; font-size:10pt }

                  .table-framework-row { font-weight: normal; color: #000000; border-right: 2.25pt solid #FFFFFF;
                  border-top: 2.25pt solid #FFFFFF; background-color: #EDF1DC; font-family:Verdana; font-size:10pt }

                  .table-framework-row-error { font-weight: bold; color: #FFFFFF; border-right: 2.25pt solid #FFFFFF;
                  border-top: 2.25pt solid #FFFFFF; background-color: #FE4010; font-family:Verdana; font-size:10pt }

                  .table-row-error { font-weight: bold; color: #FFFFFF; border-right: 2.25pt solid #FFFFFF;
                  border-top: 2.25pt solid #FFFFFF; background-color: #FF0066; font-family:Verdana; font-size:10pt }

                  table { font-family: Verdana; font-size: 8pt }

                  .heading{ color: #000000; font-family: Verdana; font-size: 18pt; font-weight: bold }


                </style>
            </head>
            <body>
                <p class="heading">EXtremecode Logger</p>
                <p>
                    <table width="150">
                        <tr align="center">
                            <td  class="table-row">Normal</td>
                        </tr>
                        <tr align="center">
                            <td class="table-row-error">Error</td>
                        </tr>
                        <tr align="center">
                            <td class="table-framework-row">Framework</td>
                        </tr>
                        <tr align="center">
                            <td class="table-framework-row-error">Framework Error</td>
                        </tr>
                    </table>
                    <table height="50">
                    </table>
                </p>
                <table class="table-main">
                    <!-- MSTableType="layout" -->
                    <!-- fpstyle: 34,011111100 -->
                    <tr class="table-header">
                        <td>LOGGING TIME</td>
                        <td>METHOD</td>
                        <td>MESSAGE</td>
                        <td>ERROR MESSAGE</td>
                        <td>CALLER</td>
                    </tr>
                    <xsl:for-each select="logging/log">
                        <!--All-->
                        <xsl:if test="1=1">
                        
                        <!--Error Logging-->
                        <!--<xsl:if test="@isError='true'">-->
                        
                        <!--tag-->
                        <!--<xsl:if test="@tag='test'">-->
                        
                        
                            <xsl:choose>
                                <xsl:when test="@isError='true' and @frameworkMethod='true'">
                                    <tr class="table-framework-row-error">
                                        <td ><xsl:value-of select="@loggingTime"/></td>
                                        <td><xsl:value-of select="@method"/></td>
                                        <td><xsl:value-of select="@message"/></td>
                                        <td><xsl:value-of select="@errorMessage"/></td>
                                        <td><xsl:value-of select="@parentMethod"/></td>
                                    </tr>
                                </xsl:when>
                                <xsl:when test="@isError='true'">
                                    <tr class="table-error-row">
                                        <td ><xsl:value-of select="@loggingTime"/></td>
                                        <td><xsl:value-of select="@method"/></td>
                                        <td><xsl:value-of select="@message"/></td>
                                        <td><xsl:value-of select="@errorMessage"/></td>
                                        <td><xsl:value-of select="@parentMethod"/></td>
                                    </tr>
                                </xsl:when>
                                <xsl:when test="@frameworkMethod='true'">
                                    <tr class="table-framework-row">
                                        <td ><xsl:value-of select="@loggingTime"/></td>
                                        <td><xsl:value-of select="@method"/></td>
                                        <td><xsl:value-of select="@message"/></td>
                                        <td><xsl:value-of select="@errorMessage"/></td>
                                        <td><xsl:value-of select="@parentMethod"/></td>
                                    </tr>
                                </xsl:when>
                                <xsl:otherwise>
                                    <tr class="table-row">
                                        <td ><xsl:value-of select="@loggingTime"/></td>
                                        <td><xsl:value-of select="@method"/></td>
                                        <td><xsl:value-of select="@message"/></td>
                                        <td><xsl:value-of select="@errorMessage"/></td>
                                        <td><xsl:value-of select="@parentMethod"/></td>
                                    </tr>
                                </xsl:otherwise>
                            </xsl:choose>
                        </xsl:if>
                    </xsl:for-each>
                    <tr class="table-header">
                        <td >LOGGING TIME</td>
                        <td>METHOD</td>
                        <td >MESSAGE</td>
                        <td >ERROR MESSAGE</td>
                        <td>CALLER</td>
                    </tr>
                </table>
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet> 
